const express = require('express');
const path = require('path');
const open = require('open');
const app = express();
const result = require('./result.json');

app.set('view engine', 'ejs');
app.set('views', `${__dirname}/views`);
app.use(express.static(path.join(__dirname, '../')));

app.get('/', (req, res) => {
    const list = result.data;
    res.render('index', { list, show: true });
});
app.listen(3011, () => {
    console.log('server runing  3011...');
    open('http://localhost:3011');
});
